

    <div class="layui-col-xs12">
	    <div class="layui-card">
	    <div class="layui-card-header">
	    	<h2>平台设置</h2>
	    </div>
	      <!--<h2 class="title">平台设置</h2>-->
	      <div class="layui-card-body">
		      <form action="" class="layui-form">
		      	
		      	<div class="layui-form-item">
	      			<div class="layui-form-label">网站名称</div>
	      			<div class="layui-input-block">
	      				<input type="text" name="webName" id="webName" class="layui-input" />
	      			</div>
	      		</div>
	      		<div class="layui-form-item">
	      			<div class="layui-form-label">联系电话</div>
	      			<div class="layui-input-block">
	      				<input type="text" name="conTel" id="conTel" class="layui-input" />
	      			</div>
	      		</div>
	      		<div class="layui-form-item">
	      			<div class="layui-form-label">网站版权</div>
	      			<div class="layui-input-block">
	      				<textarea name="" id="webCopyright" rows="" cols="" class="layui-textarea"></textarea>
	      			</div>
	      		</div>
	      		<div class="layui-form-item">
	      			<div class="layui-form-label">用户注册协议</div>
	      			<div class="layui-input-block">
	      				<textarea name="" id="userProtocol" rows="" cols="" class="layui-textarea"></textarea>
	      			</div>
	      		</div>
	      		<div class="layui-form-item">
	      			<div class="layui-form-label"></div>
	      			<div class="layui-input-block">
	      				<button class="layui-btn layui-btn-lg confirm" type="button">保存</button>
	      			</div>
	      		</div>
	      		
	      		
		      	
		      	<!--<table class="layui-table" style="table-layout:fixed" lay-size="lg" lay-skin="nob" >
				      <colgroup>
						    <col width="50">
						    <col width="500">
						  </colgroup>
				      	<tbody>
					    <tr>
					      <td>网站名称</td>
					      <td><input type="text" name="webName" id="webName" class="layui-input input33" /></td>
					    </tr>
					    <tr>
					      <td>联系电话</td>
					      <td><input type="text" name="conTel" id="conTel" class="layui-input input33" /></td>
					      
					    </tr>
					    <tr>
					      <td>网站版权</td>
					      <td >
					      	<textarea name="" id="webCopyright" rows="" cols="" class="layui-textarea"></textarea>
					      </td>
					    </tr>
					    <tr>
					      <td>用户注册协议</td>
					      <td>
					      	<textarea name="" id="userProtocol" rows="" cols="" class="layui-textarea"></textarea>
					      </td>
					    </tr>
					    
					    
					    
					    
					  </tbody>
				      	
			      </table>
		      	
		      		<div class="save-warp">
		      			<div class="layui-input-block save">
					      <button class="layui-btn layui-btn-lg confirm" type="button">保存</button>
					    </div>
		      		</div>-->
		      		
				    
		      </form>
	      </div>
	      </div>

      
      
      
      
    </div>

	<script type="text/javascript">
		let webName = document.querySelector("#webName");
		let conTel = document.querySelector("#conTel");
		let webCopyright = document.querySelector("#webCopyright");
		let userProtocol = document.querySelector("#userProtocol");
		let webLogo = document.querySelector("#webLogo");
		let confirm = document.querySelector(".confirm");
		let _obj = "";
		
		DBHelper.Post("GetXn_ShopSetting","",function(data){
			console.log(data)
			webName.value=data.Name;
			conTel.value = data.Tel;
			webCopyright.value = data.Copyright;
			userProtocol.value = data.RegProtocol;
			_obj = data;
			
		},function(data){
			console.log(data)
		})
		
		confirm.addEventListener("click",_confirm);
		
		function _confirm(){
			_obj.Name = webName.value;
			_obj.Tel = conTel.value;
			_obj.Copyright = webCopyright.value;
			_obj.RegProtocol = userProtocol.value;
			
			DBHelper.Post("UpdateXn_ShopSetting",_obj,function(data){
				console.log(data)
				let index = layer.alert('修改成功',function(){
					location.href = window.location.href
					layer.close(index)
				});
				
			},function(data){
				console.log(data)
			})
			
		}
		
		
	</script>



      <style scoped>
      	.title{
      		margin-left: 30px;
      		margin-top: 30px;
      	}
      	/*input[type="text"]{
      		border: none;
      		outline: none;
      		background-color: rgba(0,0,0,0);
      		width: 500px;
      	}*/
      	.save-warp{
      		width: 100%;
      		text-align: center;
      	}
      	.save{
      		margin-top: 30px;
      		width: 200px;
      		display: inline-block;
      	}
      	/*.confirm{
      		width: 250px;
      	}*/
      	
      </style>